package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody
// Controller 可以有响应，但是 Service 没有
//@Controller
@Service
public class UserController {
    @RequestMapping("/test")
    public String test(){
        return "测试 Controller 和 Service 的区别";
    }
}
